package com.hongyi.modelcontest.modular.wechat.service.impl;

import com.hongyi.modelcontest.modular.wechat.vo.WxMsg;

import java.util.HashMap;
import java.util.Map;

public class WxMsgFactory {
    public static WxMsg createTestMsg(String toUser, String appId,
                                      Double num) {
        WxMsg wxMsg = new WxMsg();
        wxMsg.setToUser(toUser);
        wxMsg.setAppId(appId);
        wxMsg.setTemplateId("PJBCgDJ4YCrICxZcWNGrfcXTXNlQ3XekyKHSgVp5B9c");
        wxMsg.setUrl("");
        Map<String, Object> data = new HashMap<>();
        Map<String, String> value = new HashMap<>();
        value.put("value", num + "");
        value.put("color", "#173177");
        data.put("num", value);
        wxMsg.setData(data);
        return wxMsg;
    }
}
